package org.scut.smartgeometry.ent;

import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import org.scut.smartgeometry.R;

/**
 * Menu在ListFramge里的缓存，包括图片和文字
 */
public class ViewCache {

	private View baseView;
	private TextView textView;
	private ImageView imageView;
	
    public ViewCache(View baseView) {
        this.baseView = baseView;
    }

    public TextView getTextView() {
		if(textView == null) {
			textView = (TextView) baseView.findViewById(R.id.main_menu_btn_txt);
		}
		return textView;
	}

	public ImageView getImageView() {
		if(imageView == null)
			imageView = (ImageView) baseView.findViewById(R.id.main_menu_btn_img);
		return imageView;
	}

	public View getBaseView() {
		return baseView;
	}

}
